package app.caretrack.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Entity
@Table(name = "WearParts")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class MachineWearPart extends NamedBaseModel {
    private List<Machine> machineList;

    @ManyToMany(cascade = CascadeType.REFRESH, mappedBy = "wearPartList")
    public List<Machine> getMachineList() {
        return this.machineList;
    }

    public void setMachineList(List<Machine> machineList) {
        this.machineList = machineList;
    }

}
